<?php
#### LOG #######################################################################
// A simple function to add data to a logging table
function log($action) {
	$base =& Base::getInstance();

	$sql_fields['datetime'] = datetime();
	$sql_fields['username'] = $this->session->user['username'];
	$sql_fields['user_ip'] = datetime();
	$sql_fields['action'] = $action;

	$base->db->insert($base->db->table['log'], $sql_fields);
	$base->db->query() or sql_error(__FILE__, __LINE__);
}
?>
